﻿// <copyright file="ModChangedEventArgs.cs" company="SingularityShift">
// Copyright (c) 2009 SingularityShift.com
// </copyright>
// <author>Ben McClure</author>
// <email>ben@singularityshift.com</email>
// <date>2009-08-14</date>
// <summary>Arguments describing the changes made to a mod for a ModChanged event</summary>
namespace GameLib.Games.Util
{
    /// <summary>
    /// Arguments about the ModChanged event which define how a mod has changed, and what it was changed to/from.
    /// </summary>
    public class ModChangedEventArgs : GameComponentChangedEventArgs
    {    
        /// <summary>
        /// Initializes a new instance of the ModChangedEventArgs class, specifying only the change type (with no associated object)
        /// </summary>
        /// <param name="changeType">The <see cref="ModChangeType"/> representing the change that has occurred</param>
        public ModChangedEventArgs(ModChangeType changeType)
        {
            this.ChangeType = changeType;
        }
        
        /// <summary>
        /// Initializes a new instance of the ModChangedEventArgs class, specifying both the change type and a related (Associated) object
        /// </summary>
        /// <param name="changeType">The <see cref="ModChangeType"/> representing the change that has occurred</param>
        /// <param name="value">An object to associate with the event</param>
        public ModChangedEventArgs(ModChangeType changeType, object value)
        {
            this.ChangeType = changeType;
            this.Value = value;
        }
        
        /// <summary>
        /// Gets a <see cref="ModChangeType"/> enum indicating what has changed in the mod to fire this event.
        /// </summary>
        public new ModChangeType ChangeType
        {
            get;
            private set;
        }
    }
}